package com.mzwise.tunnel.service;

public class TunnelService extends Configs {

    private WxPayService wxPayService;

    private WxTransferService wxTransferService;

    private AliPayService aliPayService;

    private V3CommonService v3CommonService;

    private V3MaterialService v3MaterialService;

    public WxPayService getWxPayService() {
        return wxPayService;
    }

    public void setWxPayService(WxPayService wxPayService) {
        this.wxPayService = wxPayService;
    }

    public WxTransferService getWxTransferService() {
        return wxTransferService;
    }

    public void setWxTransferService(WxTransferService wxTransferService) {
        this.wxTransferService = wxTransferService;
    }

    public AliPayService getAliPayService() {
        return aliPayService;
    }

    public void setAliPayService(AliPayService aliPayService) {
        this.aliPayService = aliPayService;
    }

    public V3CommonService getV3CommonService() {
        return v3CommonService;
    }

    public void setV3CommonService(V3CommonService v3CommonService) {
        this.v3CommonService = v3CommonService;
    }

    public V3MaterialService getV3MaterialService() {
        return v3MaterialService;
    }

    public void setV3MaterialService(V3MaterialService v3MaterialService) {
        this.v3MaterialService = v3MaterialService;
    }

    public void init() {
        if (this.getWxPayConfig()!=null) {
            wxPayService = new WxPayService(this);
        }

        if (this.getWxTransferConfig()!=null) {
            wxTransferService = new WxTransferService(this);
        }
        if (this.getAlipayClient()!=null) {
            aliPayService = new AliPayService(this);
        }
        if (this.getWxV3Client()!=null) {
            v3CommonService = new V3CommonService(this);
            v3MaterialService = new V3MaterialService(this);
        }
    }
}
